<?php

/**
 * Helper-Class
 * ViewTranslater
 */
class Zend_View_Helper_ViewTranslater {

    /**
     * viewTranslater fuer Zend_Translate
     *
     * @param $string
     * @param string $var
     * @return string
     */
    public function viewTranslater($string, $var = ""){

        $trans = Zend_Registry::get('Zend_Translate');
        $translateLanguage = Zend_Registry::get('Zend_Locale')->getLanguage();

        return sprintf(_($trans->translate($string, $translateLanguage)), $var);
    }

}
